#include "HIVideoCapture.hpp"

using namespace cv;

HIVideoCapture::HIVideoCapture(int device) : camera( cvCaptureFromCAM(device) ) {}
	//FIXNOW add test to make sure it didn't break

HIVideoCapture::~HIVideoCapture() {
	cvReleaseCapture( &camera );
	//FIX: problem "unrecognized selector sent to instance 0x12251f270"
}

void HIVideoCapture::operator>>( Mat& frame ) {
	
	IplImage* currentFrame = cvQueryFrame(camera);
	
	frame = currentFrame;
}
	
	

	